//
//  XTGongGaoViewController.m
//  DirectProDuct
//
//  Created by hl on 16/1/22.
//  Copyright (c) 2016年 ping. All rights reserved.
//

#import "XTGongGaoViewController.h"

@interface XTGongGaoViewController ()<UIWebViewDelegate>{
    UIWebView *gongGaoWeb;
}

@end

@implementation XTGongGaoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self drawNavWithTitle:@"系统公告"];
    [self drawBackButton];
    [self drawView];
    // Do any additional setup after loading the view.
}
-(void)drawView{
    gongGaoWeb = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, 300 * _kscW, 0)];
    gongGaoWeb.delegate = self;
    
    //[gongGaoWeb loadHTMLString:productInfo.desc baseURL:nil];//请求webView
        
    [self.view addSubview:gongGaoWeb];
}

-(void)webViewDidFinishLoad:(UIWebView *)webView{
    
        
        CGRect frame = webView.frame;
        frame.size.height = 1;
        webView.frame = frame;
        //自适应
        CGSize fittingSize = [webView sizeThatFits:CGSizeZero];
        frame.size = fittingSize;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
